home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib16.dsk
/
PADDLE MOVEMENT.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
902b
|
16 lines
4 REM REQUIRES BLOCK ROUTINES $90AA
5 REM REQUIRES BLOCK +SHAPE+ #144
10 HGR2 : CALL 37799: POKE 251,144
20 POKE 252,89: POKE 253,102: POKE 254,22: POKE 255,18: CALL 37679:NS = 7: REM DRAW STARTING SHAPE
35 P0 = PDL(0):P1 = PDL(1): REM READ THE PADDLES
45 IF P0 <150 AND P0 > = 100 THEN 70: REM NO VERTICAL MOVE
50 IF P0 <100 THEN CALL 37088: GOTO 70: REM MOVE UP
60 CALL 37034: REM MOVE DOWN
70 IF P1 > = 100 AND P1 <150 THEN 35: REM NO HORIZONTAL MOVE
75 IF ( PEEK(255) = 0 AND P1 <100) OR ( PEEK(254) = 39 AND P1 > = 150) THEN 35: REM STAY ON THE SCREEN
80 IF P1 > = 150 THEN CALL 37390:NS = NS +1: GOTO 110: REM MOVE RIGHT
90 CALL 37301:NS = NS -1: REM MOVE LEFT
100 IF NS = 0 THEN CALL 37281:NS = 7: REM DECREMENT HR-HL/RESET COUNTER
105 GOTO 35
110 IF NS = 14 THEN CALL 37296:NS = 7: REM INCREMENT HR-HL/RESET COUNTER
120 GOTO 35: REM MAKE NEXT MOVE